<template>
  <view class="page">
    <Header :title="'我的'"></Header>
    <view class="main_container">
      <view class="main_content">
        <Breadcrumb :text="'我的-今日复习-' + dateTime + '-' + info.stepName"> </Breadcrumb>
        <view class="content">
          <view class="top">
            <view class="info">
              <view class="info_content">
                <view class="info_box">
                  <view class="info_text"> 已复习 </view>
                  <view class="info_text"> {{ info.fxCount }}词 </view>
                </view>
                <view class="info_box">
                  <view class="info_text"> 错词 </view>
                  <view class="info_text"> {{ info.wrongCount }}词 </view>
                </view>
                <view class="info_box">
                  <view class="info_text"> 复习时长 </view>
                  <view class="info_text"> {{ info.timeDur }}分钟 </view>
                </view>
              </view>
              <view class="info_tis">
                剩余词数：<text style="color: #eb7b30">
                  {{ info.wordCount - info.fxCount }}</text
                >词
              </view>
            </view>
            <view class="progress">
              <view class="progress_top">
                <view>{{ info.zqn }}%</view>
                <text>正确率</text>
              </view>
              <view class="progress_bottom">
                <view class="progress_title">
                  <image
                    src="https://hengxiao-resource.oss-cn-hangzhou.aliyuncs.com/web/resources/images/hengxiao/user/gold_bg.png"
                    mode="scaleToFill"
                  />
                  <text>学币</text>
                </view>
                <view class="progress_text"> 0金币 </view>
              </view>
            </view>
          </view>
          <view class="bottom">
            <view class="btn btn1">
              <text>继续闯关</text>
            </view>
            <view
              class="btn btn2"
              @click="switchPage(`/pages/user/wrongWords?id=${id}&dateTime=${dateTime}&stepName=${info.stepName}`)"
            >
              <text>查看错词</text>
            </view>
          </view>
          <view class="tips">
            <view class="tips_text"> 要尽力 更要全力以赴 </view>
            <view class="tips_img">
              <view></view>
              <view></view>
              <view></view>
              <view></view>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
import { getFxDetailByFx } from "@/api/sync";
export default {
  components: {},
  data() {
    return {
      id: "",
      dateTime: "",
      info: {},
    };
  },
  onLoad(options) {
    this.id = options.id;
    this.dateTime = options.dateTime;
    this.getData();
  },
  methods: {
    getData() {
      getFxDetailByFx(this.id).then((res) => {
        this.info = res.data;
      });
    },
    switchPage(url) {
      uni.navigateTo({
        url: url,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
@import "./todayReviewDetail.scss";
</style>
